package cn.dengta.webapp.user.entity.game;

import java.math.BigDecimal;
import java.util.Date;

import cn.dengta.webapp.base.entity.TimeBasedEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

@Setter
@Getter
@Accessors(chain = true)
@TableName("dt_game_count")
public class GameCount extends TimeBasedEntity {

	private static final long serialVersionUID = 1L;
	/** 周期 如： 2022-11-01 */
	private Date period;
	/** 游戏id */
	private Long gameId;
	/** 参与人数 */
	private Integer userCount;
	/** 充值金额 */
	private BigDecimal rechargeAmount;
	/** 增加的金币数量 (如：用户总的下注金额) */
	private Integer addGolds;
	/** 扣减的金币数量 (如：用户获得的总奖励) */
	private Integer deduceGolds;

	public static final String GAME_ID = "game_id";
	public static final String PERIOD = "period";

	public static GameCount of(Date period, Long gameId) {
		GameCount count = new GameCount();
		count.period = period;
		count.gameId = gameId;
		return count;
	}

}
